//
//  HCompanyViewController.m
//  NursingManages
//
//  Created by Zhen Huang on 17/6/15.
//  Copyright © 2017年 huangzhen. All rights reserved.
//

#import "HCompanyViewController.h"

@interface HCompanyViewController ()
<UITableViewDelegate,
UITableViewDataSource>
@property (nonatomic,strong)UIImageView *picImage;
@property (nonatomic,strong)UIView *PicView;
@property (nonatomic,strong)UILabel *PicLabel;
@property (nonatomic,strong)UILabel *smalLabel;
@property (nonatomic,strong)UILabel *fitstLabel;
@property (nonatomic,strong)UILabel *SecLabel;
@property (nonatomic,strong)UILabel *numberLabel;
@property (nonatomic,strong)UIButton *numberButton;
@property (nonatomic,strong)UITableView *tableView;
@property (nonatomic, strong)UIView *headView;

@end

@implementation HCompanyViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:self.picImage];
    [self.headView addSubview:self.fitstLabel];
    [self.headView addSubview:self.SecLabel];
    [self.view addSubview:self.numberLabel];
    [self.view addSubview:self.numberButton];
    [self.view addSubview:self.tableView];

}

- (UIImageView *)picImage
{
    if (!_picImage) {
        _picImage = [[UIImageView alloc]initWithFrame:CGRectMake(5, NavBarHeight+ 5, ScreenWidth-10, ScreenHeight *0.25)];
        _picImage.image = [UIImage imageNamed:@"banner"];
        [_picImage addSubview:self.PicView];
        
    }
    return _picImage;
}
- (UIView *)PicView
{
    if (!_PicView) {
        _PicView = [[UIView alloc]initWithFrame:CGRectMake(0, self.picImage.height - 60, ScreenWidth, 60)];
        _PicView.backgroundColor = [UIColor blackColor];
        _PicView.alpha = 0.4;
        [_PicView addSubview:self.PicLabel];
        [_PicView addSubview:self.smalLabel];
        
    }
    return _PicView;
}
- (UILabel *)PicLabel
{
    if (!_PicLabel) {
        _PicLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 5, ScreenWidth, 35)];
        _PicLabel.textColor = [UIColor whiteColor];
        _PicLabel.font = [UIFont systemFontOfSize:18];
        _PicLabel.text = @"杭州图特信息科技有限公司";
    }
    return _PicLabel;
}
- (UILabel *)smalLabel
{
    if (!_smalLabel) {
        _smalLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, self.PicLabel.bottom-10, ScreenWidth-40, 20)];
        _smalLabel.textColor = [UIColor whiteColor];
        _smalLabel.font = [UIFont systemFontOfSize:15];
        _smalLabel.text = @"医院综合运营管理平台和医疗供应链生态平台建设领域领导厂商";
        _smalLabel.adjustsFontSizeToFitWidth = YES;
    }
    
    return _smalLabel;
}
- (UILabel *)fitstLabel
{
    if (!_fitstLabel) {
        _fitstLabel = [[UILabel alloc]initWithFrame:CGRectMake(13,  10, ScreenWidth-26, 175)];
        NSString *_test  =  @"       杭州图特信息科技有限公司是专业提供医疗卫生行业应用软件产品及服务的高新技术企业。公司汇聚经验丰 富、业务精湛、充满活力的精英人员,响应国家医疗体制改革的要求,以推动医疗行业的科学化管理为使命, 融合先进的管理理念于医疗卫生信息化建设,成功推出HRP解决方案,涵盖医疗综合协同办公平台、医院人 力资源管理系统、物资供应链管理系统、医疗设备与固定资产管理系统、智能化护理管理系统、医院全成本 核算系统、全面预算管理系统等10多项自主知识产权的产品,提供给客户最合适的服务与支持。 公司积极探索“互联网+”模式,推出了基于互联网的供应链采供云平台HSP解决方案,并专注于以云平台 为中心构建融合采购、使用、监管为一体的医疗供应链生态系统,为众多医院和超过10000家以上的供应商 提供医用耗材、药品、试剂等各类物资的采购配送在线服务。" ;
        _fitstLabel.adjustsFontSizeToFitWidth = YES;
        _fitstLabel.numberOfLines = 0;
        _fitstLabel.textColor = RGB(119, 119, 119);
        _fitstLabel.text = _test;
    }
    return _fitstLabel;
}
- (UILabel *)SecLabel
{
    if (!_SecLabel) {
        _SecLabel = [[UILabel alloc]initWithFrame:CGRectMake(13, self.fitstLabel.bottom + 5, ScreenWidth-26, 150)];
        _SecLabel.adjustsFontSizeToFitWidth = YES;
        _SecLabel.numberOfLines = 0;
        _SecLabel.text = @"        图特致力于解决方案的开发与创新,运用前瞻性的医疗行业发展和信息化建设思路,在人力资源绩效管理、 物资供应链流程设计、成本控制与预算管理、标准编码体系研究等专业领域完成了10余项国家级、省市级课 题项目,并与浙江大学、杭州电子科技大学等多所知名高校的科研团队达成长期战略合作关系,充分发挥产、 学、研互动的整体优势,提升了公司的核心竞争力。 公司秉承“客户至上、以人为本、持续创新、合作共赢”的经营理念,致力于构筑客户、公司、员工和合作 伙伴之间“多赢”的和谐关系,携手共进建立起共同成长的新型产业链,创造可持续发展的价值,更好地服 务于中国医疗卫生行业。";
        _SecLabel.textColor = RGB(119, 119, 119);
    }
    
    return _SecLabel;
}

- (UILabel *)numberLabel {
    if (!_numberLabel) {
        _numberLabel = [[UILabel alloc]init];
        _numberLabel.frame = CGRectMake(ScreenWidth *0.27, ScreenHeight-35, 100, 30);
        _numberLabel.text =@"售后热线:";
        _numberLabel.textColor = [UIColor grayColor];
        _numberLabel.font = [UIFont systemFontOfSize:14];
    }
    return _numberLabel;
}
- (UIButton *)numberButton {
    if (!_numberButton) {
        _numberButton = [UIButton buttonWithType:UIButtonTypeCustom];
        _numberButton.frame = CGRectMake(self.numberLabel.right-30, ScreenHeight-35, ScreenWidth *0.5, 30);
        [_numberButton setTitle:@"0571-89932325" forState:UIControlStateNormal];
        [_numberButton setTitleColor:RGB(13, 140, 236) forState:UIControlStateNormal];
        _numberButton.titleLabel.font = [UIFont systemFontOfSize:14];
        [_numberButton setContentHorizontalAlignment:UIControlContentHorizontalAlignmentLeft];
        [_numberButton addTarget:self action:@selector(handcall:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _numberButton;
}

//拨打技术客服电话
- (void)handcall:(UIButton *)sender {
    
    NSMutableString * str=[[NSMutableString alloc] initWithFormat:@"tel:%@",self.numberButton.titleLabel.text];
    UIWebView * callWebview = [[UIWebView alloc] init];
    [callWebview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:str]]];
    [self.view addSubview:callWebview];
    
    
}

- (UITableView *)tableView
{
    if (!_tableView ) {
        _tableView = [[UITableView alloc]initWithFrame:CGRectMake(0, self.picImage.bottom + 3,ScreenWidth , ScreenHeight - self.picImage.bottom - 40) style:UITableViewStyleGrouped];
        [_tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"cell"];
        _tableView.tableFooterView = [[UIView alloc]init];
        _tableView.tableHeaderView = self.headView;
        _tableView.backgroundColor = [UIColor whiteColor];
        _tableView.dataSource = self;
        _tableView.delegate = self;
    }
    return _tableView;
}

- (UIView *)headView
{
    if (!_headView) {
        _headView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenWidth, ScreenHeight - self.picImage.bottom - 40)];
        _headView.backgroundColor = [UIColor whiteColor];
    }
    return _headView;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 0;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell" forIndexPath:indexPath];
    return cell;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}


@end
